package sfeir.gwt.ergosum.client;

import sfeir.gwt.ergosum.client.model.Person;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("client")
public interface ClientApi extends RemoteService {

    public Person getUserProfile() throws NotLoggedInException;
    public Person getProfile(String email) throws NotLoggedInException;
    public Long createProfile(Person p) throws NotLoggedInException;
    public Boolean checkAlias(String alias) throws NotLoggedInException;
    
    @SuppressWarnings("serial")
    public static class NotLoggedInException extends Exception {
    }
}
